package com.batch.quartz.job;

import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <h3>partitionjob</h3>
 * <p>导入用户</p>
 *
 * @author : hduong
 * @version : 1.0
 * @date : 2019-12-20 15:02
 **/
@Component
//@PersistJobDataAfterExecution
//// 禁止任务并发执行
//@DisallowConcurrentExecution
public class ImportUserJob implements Job {

    @Autowired
    private ImportUserServiceImpl importUserService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        String taskId = String.valueOf(System.currentTimeMillis());
        importUserService.executeBatchJob(taskId);
    }
}
